curl -XPOST http://127.0.0.1:9200/_aliases -d '
{
    "actions": [
        { "remove": { "index": "media_v1", "alias": "media" }},
        { "add":    { "index": "media_v2", "alias": "media" }}
    ]
}'

